# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-arpeggio
pkgver=2.0.0
pkgrel=0
pkgdesc="Recursive descent parser based on PEG grammars"
url="https://github.com/textX/Arpeggio"
license="MIT"
arch="noarch"
depends="python3"
makedepends="
	py3-pytest-runner
	py3-setuptools
	"
checkdepends="py3-pytest"
source="https://github.com/textX/Arpeggio/archive/$pkgver/Arpeggio-$pkgver.tar.gz"
builddir="$srcdir/Arpeggio-$pkgver"

prepare() {
	default_prepare

	sed -e "/wheel/d" -i setup.cfg
}

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build

	rm -r "$pkgdir"/usr/lib/python3.*/site-packages/arpeggio/tests
}

sha512sums="
b5a75eea515b7dd0ad7dc261703300bd5b3e5a70f0946845f8828dbf7c76613aef926fed9538fe0f9a71c1666edc9f8cff31afddd551bea1d7b1b9ad7a9cc405  Arpeggio-2.0.0.tar.gz
"
